3.1.15 \(\int \frac {d+e x}{1+x^2+x^4} \, dx\)

Optimal. Leaf size=92 \[ -\frac {1}{4} d \log \left (x^2-x+1\right )+\frac {1}{4} d \log \left (x^2+x+1\right )-\frac {d \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {d \tan ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {e \tan ^{-1}\left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 15, number of rules used = 8, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {1673, 12, 1094, 634, 618, 204, 628, 1107} \begin {gather*} -\frac {1}{4} d \log \left (x^2-x+1\right )+\frac {1}{4} d \log \left (x^2+x+1\right )-\frac {d \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {d \tan ^{-1}\left (\frac {2 x+1}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {e \tan ^{-1}\left (\frac {2 x^2+1}{\sqrt {3}}\right )}{\sqrt {3}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)/(1 + x^2 + x^4),x]

[Out]

-(d*ArcTan[(1 - 2*x)/Sqrt[3]])/(2*Sqrt[3]) + (d*ArcTan[(1 + 2*x)/Sqrt[3]])/(2*Sqrt[3]) + (e*ArcTan[(1 + 2*x^2)
/Sqrt[3]])/Sqrt[3] - (d*Log[1 - x + x^2])/4 + (d*Log[1 + x + x^2])/4

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1094

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}
, Dist[1/(2*c*q*r), Int[(r - x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(r + x)/(q + r*x + x^2), x], x
]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]

Rule 1107

Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
 x, x^2], x] /; FreeQ[{a, b, c, p}, x]

Rule 1673

Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] &&  !PolyQ[Pq, x^2]

Rubi steps

\begin {align*} \int \frac {d+e x}{1+x^2+x^4} \, dx &=\int \frac {d}{1+x^2+x^4} \, dx+\int \frac {e x}{1+x^2+x^4} \, dx\\ &=d \int \frac {1}{1+x^2+x^4} \, dx+e \int \frac {x}{1+x^2+x^4} \, dx\\ &=\frac {1}{2} d \int \frac {1-x}{1-x+x^2} \, dx+\frac {1}{2} d \int \frac {1+x}{1+x+x^2} \, dx+\frac {1}{2} e \operatorname {Subst}\left (\int \frac {1}{1+x+x^2} \, dx,x,x^2\right )\\ &=\frac {1}{4} d \int \frac {1}{1-x+x^2} \, dx-\frac {1}{4} d \int \frac {-1+2 x}{1-x+x^2} \, dx+\frac {1}{4} d \int \frac {1}{1+x+x^2} \, dx+\frac {1}{4} d \int \frac {1+2 x}{1+x+x^2} \, dx-e \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 x^2\right )\\ &=\frac {e \tan ^{-1}\left (\frac {1+2 x^2}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {1}{4} d \log \left (1-x+x^2\right )+\frac {1}{4} d \log \left (1+x+x^2\right )-\frac {1}{2} d \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 x\right )-\frac {1}{2} d \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1+2 x\right )\\ &=-\frac {d \tan ^{-1}\left (\frac {1-2 x}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {d \tan ^{-1}\left (\frac {1+2 x}{\sqrt {3}}\right )}{2 \sqrt {3}}+\frac {e \tan ^{-1}\left (\frac {1+2 x^2}{\sqrt {3}}\right )}{\sqrt {3}}-\frac {1}{4} d \log \left (1-x+x^2\right )+\frac {1}{4} d \log \left (1+x+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.18, size = 98, normalized size = 1.07 \begin {gather*} \frac {1}{6} i \left (\sqrt {6-6 i \sqrt {3}} d \tan ^{-1}\left (\frac {1}{2} \left (\sqrt {3}-i\right ) x\right )-\sqrt {6+6 i \sqrt {3}} d \tan ^{-1}\left (\frac {1}{2} \left (\sqrt {3}+i\right ) x\right )+2 i \sqrt {3} e \tan ^{-1}\left (\frac {\sqrt {3}}{2 x^2+1}\right )\right ) \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(d + e*x)/(1 + x^2 + x^4),x]

[Out]

(I/6)*(Sqrt[6 - (6*I)*Sqrt[3]]*d*ArcTan[((-I + Sqrt[3])*x)/2] - Sqrt[6 + (6*I)*Sqrt[3]]*d*ArcTan[((I + Sqrt[3]
)*x)/2] + (2*I)*Sqrt[3]*e*ArcTan[Sqrt[3]/(1 + 2*x^2)])

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {d+e x}{1+x^2+x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(d + e*x)/(1 + x^2 + x^4),x]

[Out]

IntegrateAlgebraic[(d + e*x)/(1 + x^2 + x^4), x]

________________________________________________________________________________________

fricas [A]  time = 1.12, size = 65, normalized size = 0.71 \begin {gather*} \frac {1}{6} \, \sqrt {3} {\left (d - 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, \sqrt {3} {\left (d + 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, d \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, d \log \left (x^{2} - x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4+x^2+1),x, algorithm="fricas")

[Out]

1/6*sqrt(3)*(d - 2*e)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/
4*d*log(x^2 + x + 1) - 1/4*d*log(x^2 - x + 1)

________________________________________________________________________________________

giac [A]  time = 0.38, size = 67, normalized size = 0.73 \begin {gather*} \frac {1}{6} \, \sqrt {3} {\left (d - 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, \sqrt {3} {\left (d + 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, d \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, d \log \left (x^{2} - x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4+x^2+1),x, algorithm="giac")

[Out]

1/6*sqrt(3)*(d - 2*e)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/
4*d*log(x^2 + x + 1) - 1/4*d*log(x^2 - x + 1)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 92, normalized size = 1.00 \begin {gather*} \frac {\sqrt {3}\, d \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right )}{6}+\frac {\sqrt {3}\, d \arctan \left (\frac {\left (2 x -1\right ) \sqrt {3}}{3}\right )}{6}-\frac {d \ln \left (x^{2}-x +1\right )}{4}+\frac {d \ln \left (x^{2}+x +1\right )}{4}-\frac {\sqrt {3}\, e \arctan \left (\frac {\left (2 x +1\right ) \sqrt {3}}{3}\right )}{3}+\frac {\sqrt {3}\, e \arctan \left (\frac {\left (2 x -1\right ) \sqrt {3}}{3}\right )}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)/(x^4+x^2+1),x)

[Out]

1/4*d*ln(x^2+x+1)+1/6*d*arctan(1/3*(1+2*x)*3^(1/2))*3^(1/2)-1/3*3^(1/2)*arctan(1/3*(1+2*x)*3^(1/2))*e-1/4*d*ln
(x^2-x+1)+1/6*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))*d+1/3*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))*e

________________________________________________________________________________________

maxima [A]  time = 2.21, size = 65, normalized size = 0.71 \begin {gather*} \frac {1}{6} \, \sqrt {3} {\left (d - 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x + 1\right )}\right ) + \frac {1}{6} \, \sqrt {3} {\left (d + 2 \, e\right )} \arctan \left (\frac {1}{3} \, \sqrt {3} {\left (2 \, x - 1\right )}\right ) + \frac {1}{4} \, d \log \left (x^{2} + x + 1\right ) - \frac {1}{4} \, d \log \left (x^{2} - x + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x^4+x^2+1),x, algorithm="maxima")

[Out]

1/6*sqrt(3)*(d - 2*e)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e)*arctan(1/3*sqrt(3)*(2*x - 1)) + 1/
4*d*log(x^2 + x + 1) - 1/4*d*log(x^2 - x + 1)

________________________________________________________________________________________

mupad [B]  time = 0.24, size = 118, normalized size = 1.28 \begin {gather*} -\ln \left (x-\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}\right )+\ln \left (x+\frac {1}{2}-\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}-\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}\right )+\ln \left (x-\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (-\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}+\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}\right )+\ln \left (x+\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,\left (\frac {d}{4}+\frac {\sqrt {3}\,d\,1{}\mathrm {i}}{12}-\frac {\sqrt {3}\,e\,1{}\mathrm {i}}{6}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d + e*x)/(x^2 + x^4 + 1),x)

[Out]

log(x - (3^(1/2)*1i)/2 + 1/2)*(d/4 - (3^(1/2)*d*1i)/12 + (3^(1/2)*e*1i)/6) - log(x - (3^(1/2)*1i)/2 - 1/2)*(d/
4 + (3^(1/2)*d*1i)/12 + (3^(1/2)*e*1i)/6) + log(x + (3^(1/2)*1i)/2 - 1/2)*((3^(1/2)*d*1i)/12 - d/4 + (3^(1/2)*
e*1i)/6) + log(x + (3^(1/2)*1i)/2 + 1/2)*(d/4 + (3^(1/2)*d*1i)/12 - (3^(1/2)*e*1i)/6)

________________________________________________________________________________________

sympy [C]  time = 2.89, size = 923, normalized size = 10.03

result too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)/(x**4+x**2+1),x)

[Out]

(-d/4 - sqrt(3)*I*(d + 2*e)/12)*log(x + (-7*d**4*e + 6*d**4*(-d/4 - sqrt(3)*I*(d + 2*e)/12) - 15*d**2*e**3 - 1
8*d**2*e**2*(-d/4 - sqrt(3)*I*(d + 2*e)/12) + 60*d**2*e*(-d/4 - sqrt(3)*I*(d + 2*e)/12)**2 + 72*d**2*(-d/4 - s
qrt(3)*I*(d + 2*e)/12)**3 + 4*e**5 + 24*e**4*(-d/4 - sqrt(3)*I*(d + 2*e)/12) + 48*e**3*(-d/4 - sqrt(3)*I*(d +
2*e)/12)**2 + 288*e**2*(-d/4 - sqrt(3)*I*(d + 2*e)/12)**3)/(3*d**5 - 8*d**3*e**2 - 16*d*e**4)) + (-d/4 + sqrt(
3)*I*(d + 2*e)/12)*log(x + (-7*d**4*e + 6*d**4*(-d/4 + sqrt(3)*I*(d + 2*e)/12) - 15*d**2*e**3 - 18*d**2*e**2*(
-d/4 + sqrt(3)*I*(d + 2*e)/12) + 60*d**2*e*(-d/4 + sqrt(3)*I*(d + 2*e)/12)**2 + 72*d**2*(-d/4 + sqrt(3)*I*(d +
 2*e)/12)**3 + 4*e**5 + 24*e**4*(-d/4 + sqrt(3)*I*(d + 2*e)/12) + 48*e**3*(-d/4 + sqrt(3)*I*(d + 2*e)/12)**2 +
 288*e**2*(-d/4 + sqrt(3)*I*(d + 2*e)/12)**3)/(3*d**5 - 8*d**3*e**2 - 16*d*e**4)) + (d/4 - sqrt(3)*I*(d - 2*e)
/12)*log(x + (-7*d**4*e + 6*d**4*(d/4 - sqrt(3)*I*(d - 2*e)/12) - 15*d**2*e**3 - 18*d**2*e**2*(d/4 - sqrt(3)*I
*(d - 2*e)/12) + 60*d**2*e*(d/4 - sqrt(3)*I*(d - 2*e)/12)**2 + 72*d**2*(d/4 - sqrt(3)*I*(d - 2*e)/12)**3 + 4*e
**5 + 24*e**4*(d/4 - sqrt(3)*I*(d - 2*e)/12) + 48*e**3*(d/4 - sqrt(3)*I*(d - 2*e)/12)**2 + 288*e**2*(d/4 - sqr
t(3)*I*(d - 2*e)/12)**3)/(3*d**5 - 8*d**3*e**2 - 16*d*e**4)) + (d/4 + sqrt(3)*I*(d - 2*e)/12)*log(x + (-7*d**4
*e + 6*d**4*(d/4 + sqrt(3)*I*(d - 2*e)/12) - 15*d**2*e**3 - 18*d**2*e**2*(d/4 + sqrt(3)*I*(d - 2*e)/12) + 60*d
**2*e*(d/4 + sqrt(3)*I*(d - 2*e)/12)**2 + 72*d**2*(d/4 + sqrt(3)*I*(d - 2*e)/12)**3 + 4*e**5 + 24*e**4*(d/4 +
sqrt(3)*I*(d - 2*e)/12) + 48*e**3*(d/4 + sqrt(3)*I*(d - 2*e)/12)**2 + 288*e**2*(d/4 + sqrt(3)*I*(d - 2*e)/12)*
*3)/(3*d**5 - 8*d**3*e**2 - 16*d*e**4))

________________________________________________________________________________________